package com.tucue.dao;

import com.tucue.model.News;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface NewsMapper {
    int deleteByPrimaryKey(Integer newsid);

    int insert(News record);

    int insertSelective(News record);

    News selectByPrimaryKey(Integer newsid);

    List<News> selectAll();

    //更新资讯
    int updateNews(News record);

    int updateByPrimaryKey(News record);

    //单个删除资讯
    int deleteNews(@Param(value = "id") int id, @Param(value = "visible") int visible);


    //批量删除资讯
    int deleteNewsBatch(@Param(value = "idlist") List<Integer> idlist, @Param(value = "visible") int visible);

    //批量修改资讯状态
    int updateNewsStatusBatch(@Param(value = "idlist") List<Integer> idlist, @Param(value = "status") int visible);


}